"),
y(A(this.panel), this.clsMode));
const {body: t, scrollingElement: e} = document;
y(t, this.clsContainer, this.clsFlip),
h(t, "touch-action", "pan-y pinch-zoom"),
h(this.$el, "display", "block"),
h(this.panel, "maxWidth", e.clientWidth),
y(this.$el, this.clsOverlay),
y(this.panel, this.clsSidebarAnimation, this.mode === "reveal" ? "" : this.clsMode),
et(t),
y(t, this.clsContainerAnimation),
this.clsContainerAnimation && ja()
}
}, {
name: "hide",
self: !0,
handler() {
z(document.body, this.clsContainerAnimation),
h(document.body, "touch-action", "")
}
}, {
name: "hidden",
self: !0,
handler() {
this.clsContainerAnimation && qa(),
this.mode === "reveal" && _e(this.panel),
z(this.panel, this.clsSidebarAnimation, this.clsMode),
z(this.$el, this.clsOverlay),
h(this.$el, "display", ""),
h(this.panel, "maxWidth", ""),
z(document.body, this.clsContainer, this.clsFlip)
}
}, {
name: "swipeLeft swipeRight",
handler(t) {
this.isToggled() && Qt(t.type, "Left") ^ this.flip && this.hide()
}
}]
};
function ja() {
_n().content += ",user-scalable=0"
}
function qa() {
const t = _n();
t.content = t.content.replace(/,user-scalable=0$/, "")
}
function _n() {
return w('meta[name="viewport"]', document.head) || W(document.head, '
')
}
var Va = {
mixins: [st, bt],
props: {
selContainer: String,
selContent: String,
minHeight: Number
},
data: {
selContainer: ".bdt-modal",
selContent: ".bdt-modal-dialog",
minHeight: 150
},
computed: {
container({selContainer: t}, e) {
return Y(e, t)
},
content({selContent: t}, e) {
return Y(e, t)
}
},
resizeTargets() {
return [this.container, this.content]
},
update: {
read() {
return !this.content || !this.container || !q(this.$el) ? !1 : {
max: Math.max(this.minHeight, et(this.container) - (b(this.content).height - et(this.$el)))
}
},
write({max: t}) {
h(this.$el, {
minHeight: this.minHeight,
maxHeight: t
})
},
events: ["resize"]
}
}
, Ya = {
mixins: [bt],
props: ["width", "height"],
resizeTargets() {
return [this.$el, A(this.$el)]
},
connected() {
y(this.$el, "bdt-responsive-width")
},
update: {
read() {
return q(this.$el) && this.width && this.height ? {
width: Ee(A(this.$el)),
height: this.height
} : !1
},
write(t) {
et(this.$el, Ge.contain({
height: this.height,
width: this.width
}, t).height)
},
events: ["resize"]
}
}
, Ga = {
props: {
offset: Number
},
data: {
offset: 0
},
connected() {
Xa(this)
},
disconnected() {
Ja(this)
},
methods: {
async scrollTo(t) {
t = t && w(t) || document.body,
m(this.$el, "beforescroll", [this, t]) && (await qs(t, {
offset: this.offset
}),
m(this.$el, "scrolled", [this, t]))
}
}
};
const Ne = new Set;
function Xa(t) {
Ne.size || x(document, "click", En),
Ne.add(t)
}
function Ja(t) {
Ne.delete(t),
Ne.size || zt(document, "click", En)
}
function En(t) {
if (!t.defaultPrevented)
for (const e of Ne)
D(t.target, e.$el) && De(e.$el) && (t.preventDefault(),
e.scrollTo(on(e.$el)))
}
var Ka = {
mixins: [ci],
args: "cls",
props: {
cls: String,
target: String,
hidden: Boolean,
margin: String,
repeat: Boolean,
delay: Number
},
data: ()=>({
cls: "",
target: !1,
hidden: !0,
margin: "-1px",
repeat: !1,
delay: 0,
inViewClass: "bdt-scrollspy-inview"
}),
computed: {
elements: {
get({target: t}, e) {
return t ? O(t, e) : [e]
},
watch(t, e) {
this.hidden && h(ke(t, `:not(.${this.inViewClass})`), "opacity", 0),
be(t, e) || this.$reset()
},
immediate: !0
}
},
connected() {
this._data.elements = new Map,
this.registerObserver(ce(this.elements, t=>{
const e = this._data.elements;
for (const {target: i, isIntersecting: s} of t) {
e.has(i) || e.set(i, {
cls: tt(i, "bdt-scrollspy-class") || this.cls
});
const n = e.get(i);
!this.repeat && n.show || (n.show = s)
}
this.$emit()
}
, {
rootMargin: this.margin
}, !1))
},
disconnected() {
for (const [t,e] of this._data.elements.entries())
z(t, this.inViewClass, (e == null ? void 0 : e.cls) || "")
},
update: [{
write(t) {
for (const [e,i] of t.elements.entries())
i.show && !i.inview && !i.queued ? (i.queued = !0,
t.promise = (t.promise || Promise.resolve()).then(()=>new Promise(s=>setTimeout(s, this.delay))).then(()=>{
this.toggle(e, !0),
setTimeout(()=>{
i.queued = !1,
this.$emit()
}
, 300)
}
)) : !i.show && i.inview && !i.queued && this.repeat && this.toggle(e, !1)
}
}],
methods: {
toggle(t, e) {
var i;
const s = this._data.elements.get(t);
if (s) {
if ((i = s.off) == null || i.call(s),
h(t, "opacity", !e && this.hidden ? 0 : ""),
j(t, this.inViewClass, e),
j(t, s.cls),
/\bbdt-animation-/.test(s.cls)) {
const n = ()=>Wi(t, "bdt-animation-[\\w-]+");
e ? s.off = L(t, "animationcancel animationend", n) : n()
}
m(t, e ? "inview" : "outview"),
s.inview = e,
this.$update(t)
}
}
}
}
, Za = {
mixins: [ci],
props: {
cls: String,
closest: String,
scroll: Boolean,
overflow: Boolean,
offset: Number
},
data: {
cls: "bdt-active",
closest: !1,
scroll: !1,
overflow: !0,
offset: 0
},
computed: {
links: {
get(t, e) {
return O('a[href*="#"]', e).filter(i=>i.hash && De(i))
},
watch(t) {
this.scroll && this.$create("scroll", t, {
offset: this.offset || 0
})
},
immediate: !0
},
elements({closest: t}) {
return Y(this.links, t || "*")
}
},
update: [{
read() {
const t = this.links.map(on).filter(Boolean)
, {length: e} = t;
if (!e || !q(this.$el))
return !1;
const [i] = mt(t, !0)
, {scrollTop: s, scrollHeight: n} = i
, o = at(i)
, r = n - o.height;
let a = !1;
if (s === r)
a = e - 1;
else {
for (let l = 0; l < t.length && !(I(t[l]).top - o.top - this.offset > 0); l++)
a = +l;
a === !1 && this.overflow && (a = 0)
}
return {
active: a
}
},
write({active: t}) {
const e = t !== !1 && !B(this.elements[t], this.cls);
this.links.forEach(i=>i.blur());
for (let i = 0; i < this.elements.length; i++)
j(this.elements[i], this.cls, +i === t);
e && m(this.$el, "active", [t, this.elements[t]])
},
events: ["scroll", "resize"]
}]
}
, Qa = {
mixins: [st, mi, bt, ci],
props: {
position: String,
top: null,
bottom: null,
start: null,
end: null,
offset: String,
overflowFlip: Boolean,
animation: String,
clsActive: String,
clsInactive: String,
clsFixed: String,
clsBelow: String,
selTarget: String,
showOnUp: Boolean,
targetOffset: Number
},
data: {
position: "top",
top: !1,
bottom: !1,
start: !1,
end: !1,
offset: 0,
overflowFlip: !1,
animation: "",
clsActive: "bdt-active",
clsInactive: "",
clsFixed: "bdt-sticky-fixed",
clsBelow: "bdt-sticky-below",
selTarget: "",
showOnUp: !1,
targetOffset: !1
},
computed: {
selTarget({selTarget: t}, e) {
return t && w(t, e) || e
}
},
resizeTargets() {
return document.documentElement
},
connected() {
this.start = In(this.start || this.top),
this.end = In(this.end || this.bottom),
this.placeholder = w("+ .bdt-sticky-placeholder", this.$el) || w('
'),
this.isFixed = !1,
this.setActive(!1),
this.registerObserver(Pe(this.$el, ()=>!this.isFixed && this.$emit("resize")))
},
disconnected() {
this.isFixed && (this.hide(),
z(this.selTarget, this.clsInactive)),
Pn(this.$el),
ot(this.placeholder),
this.placeholder = null
},
events: [{
name: "resize",
el() {
return [window, window.visualViewport]
},
handler() {
this.$emit("resizeViewport")
}
}, {
name: "load hashchange popstate",
el() {
return window
},
filter() {
return this.targetOffset !== !1
},
handler() {
const {scrollingElement: t} = document;
!location.hash || t.scrollTop === 0 || setTimeout(()=>{
const e = I(w(location.hash))
, i = I(this.$el);
this.isFixed && Oi(e, i) && (t.scrollTop = e.top - i.height - rt(this.targetOffset, "height", this.placeholder) - rt(this.offset, "height", this.placeholder))
}
)
}
}],
update: [{
read({height: t, width: e, margin: i, sticky: s}, n) {
if (this.inactive = !this.matchMedia || !q(this.$el),
this.inactive)
return;
const o = this.isFixed && n.has("resize") && !s;
o && (h(this.selTarget, "transition", "0s"),
this.hide()),
this.active || ({height: t, width: e} = I(this.$el),
i = h(this.$el, "margin")),
o && (this.show(),
requestAnimationFrame(()=>h(this.selTarget, "transition", "")));
const r = rt("100vh", "height")
, a = et(window)
, l = document.scrollingElement.scrollHeight - r;
let c = this.position;
this.overflowFlip && t > r && (c = c === "top" ? "bottom" : "top");
const u = this.isFixed ? this.placeholder : this.$el;
let d = rt(this.offset, "height", s ? this.$el : u);
c === "bottom" && (t < a || this.overflowFlip) && (d += a - t);
const p = this.overflowFlip ? 0 : Math.max(0, t + d - r)
, g = I(u).top
, T = I(this.$el).height
, F = (this.start === !1 ? g : as(this.start, this.$el, g)) - d
, M = this.end === !1 ? l : Math.min(l, as(this.end, this.$el, g + t, !0) - T - d + p);
return s = l && !this.showOnUp && F + d === g && M === Math.min(l, as("!*", this.$el, 0, !0) - T - d + p) && h(A(this.$el), "overflowY") === "visible",
{
start: F,
end: M,
offset: d,
overflow: p,
topOffset: g,
height: t,
elHeight: T,
width: e,
margin: i,
top: Wt(u)[0],
sticky: s
}
},
write({height: t, width: e, margin: i, offset: s, sticky: n}) {
if ((this.inactive || n || !this.isFixed) && Pn(this.$el),
this.inactive)
return;
n && (t = e = i = 0,
h(this.$el, {
position: "sticky",
top: s
}));
const {placeholder: o} = this;
h(o, {
height: t,
width: e,
margin: i
}),
D(o, document) || (o.hidden = !0),
(n ? Ke : Ze)(this.$el, o)
},
events: ["resize", "resizeViewport"]
}, {
read({scroll: t=0, dir: e="down", overflow: i, overflowScroll: s=0, start: n, end: o}) {
const r = document.scrollingElement.scrollTop;
return {
dir: t <= r ? "down" : "up",
prevDir: e,
scroll: r,
prevScroll: t,
offsetParentTop: I((this.isFixed ? this.placeholder : this.$el).offsetParent).top,
overflowScroll: U(s + U(r, n, o) - U(t, n, o), 0, i)
}
},
write(t, e) {
const i = e.has("scroll")
, {initTimestamp: s=0, dir: n, prevDir: o, scroll: r, prevScroll: a=0, top: l, start: c, topOffset: u, height: d} = t;
if (r < 0 || r === a && i || this.showOnUp && !i && !this.isFixed)
return;
const p = Date.now();
if ((p - s > 300 || n !== o) && (t.initScroll = r,
t.initTimestamp = p),
!(this.showOnUp && !this.isFixed && Math.abs(t.initScroll - r) <= 30 && Math.abs(a - r) <= 10))
if (this.inactive || r < c || this.showOnUp && (r <= c || n === "down" && i || n === "up" && !this.isFixed && r <= u + d)) {
if (!this.isFixed) {
pt.inProgress(this.$el) && l > r && (pt.cancel(this.$el),
this.hide());
return
}
this.animation && r > u ? (pt.cancel(this.$el),
pt.out(this.$el, this.animation).then(()=>this.hide(), P)) : this.hide()
} else
this.isFixed ? this.update() : this.animation && r > u ? (pt.cancel(this.$el),
this.show(),
pt.in(this.$el, this.animation).catch(P)) : this.show()
},
events: ["resize", "resizeViewport", "scroll"]
}],
methods: {
show() {
this.isFixed = !0,
this.update(),
this.placeholder.hidden = !1
},
hide() {
const {offset: t, sticky: e} = this._data;
this.setActive(!1),
z(this.$el, this.clsFixed, this.clsBelow),
e ? h(this.$el, "top", t) : h(this.$el, {
position: "",
top: "",
width: "",
marginTop: ""
}),
this.placeholder.hidden = !0,
this.isFixed = !1
},
update() {
let {width: t, scroll: e=0, overflow: i, overflowScroll: s=0, start: n, end: o, offset: r, topOffset: a, height: l, elHeight: c, offsetParentTop: u, sticky: d} = this._data;
const p = n !== 0 || e > n;
if (!d) {
let g = "fixed";
e > o && (r += o - u,
g = "absolute"),
h(this.$el, {
position: g,
width: t
}),
h(this.$el, "marginTop", 0, "important")
}
i && (r -= s),
h(this.$el, "top", r),
this.setActive(p),
j(this.$el, this.clsBelow, e > a + (d ? Math.min(l, c) : l)),
y(this.$el, this.clsFixed)
},
setActive(t) {
const e = this.active;
this.active = t,
t ? (Ri(this.selTarget, this.clsInactive, this.clsActive),
e !== t && m(this.$el, "active")) : (Ri(this.selTarget, this.clsActive, this.clsInactive),
e !== t && m(this.$el, "inactive"))
}
}
};
function as(t, e, i, s) {
if (!t)
return 0;
if (vt(t) || N(t) && t.match(/^-?\d/))
return i + rt(t, "height", e, !0);
{
const n = t === !0 ? A(e) : ut(t, e);
return I(n).bottom - (s && n && D(e, n) ? $(h(n, "paddingBottom")) : 0)
}
}
function In(t) {
return t === "true" ? !0 : t === "false" ? !1 : t
}
function Pn(t) {
h(t, {
position: "",
top: "",
marginTop: "",
width: ""
})
}
const ls = ".bdt-disabled *, .bdt-disabled, [disabled]";
var An = {
mixins: [Oe, Cn, Yt],
args: "connect",
props: {
connect: String,
toggle: String,
itemNav: String,
active: Number,
followFocus: Boolean
},
data: {
connect: "~.bdt-switcher",
toggle: "> * > :first-child",
itemNav: !1,
active: 0,
cls: "bdt-active",
attrItem: "bdt-switcher-item",
selVertical: ".bdt-nav",
followFocus: !1
},
computed: {
connects: {
get({connect: t}, e) {
return Se(t, e)
},
watch(t) {
this.swiping && h(t, "touchAction", "pan-y pinch-zoom"),
this.$emit()
},
document: !0,
immediate: !0
},
connectChildren: {
get() {
return this.connects.map(t=>E(t)).flat()
},
watch() {
const t = this.index();
for (const e of this.connects)
E(e).forEach((i,s)=>j(i, this.cls, s === t)),
this.lazyload(this.$el, E(e));
this.$emit()
},
immediate: !0
},
toggles: {
get({toggle: t}, e) {
return O(t, e)
},
watch(t) {
this.$emit();
const e = this.index();
this.show(~e ? e : t[this.active] || t[0])
},
immediate: !0
},
children() {
return E(this.$el).filter(t=>this.toggles.some(e=>D(e, t)))
},
swipeTarget() {
return this.connects
}
},
connected() {
f(this.$el, "role", "tablist")
},
events: [{
name: "click keydown",
delegate() {
return this.toggle
},
handler(t) {
!_(t.current, ls) && (t.type === "click" || t.keyCode === C.SPACE) && (t.preventDefault(),
this.show(t.current))
}
}, {
name: "keydown",
delegate() {
return this.toggle
},
handler(t) {
const {current: e, keyCode: i} = t
, s = _(this.$el, this.selVertical);
let n = i === C.HOME ? 0 : i === C.END ? "last" : i === C.LEFT && !s || i === C.UP && s ? "previous" : i === C.RIGHT && !s || i === C.DOWN && s ? "next" : -1;
if (~n) {
t.preventDefault();
const o = this.toggles.filter(a=>!_(a, ls))
, r = o[ct(n, o, o.indexOf(e))];
r.focus(),
this.followFocus && this.show(r)
}
}
}, {
name: "click",
el() {
return this.connects.concat(this.itemNav ? Se(this.itemNav, this.$el) : [])
},
delegate() {
return `[${this.attrItem}],[data-${this.attrItem}]`
},
handler(t) {
Y(t.target, "a,button") && (t.preventDefault(),
this.show(tt(t.current, this.attrItem)))
}
}, {
name: "swipeRight swipeLeft",
filter() {
return this.swiping
},
el() {
return this.connects
},
handler({type: t}) {
this.show(Qt(t, "Left") ? "next" : "previous")
}
}],
update() {
var t;
f(this.connects, "role", "presentation"),
f(E(this.$el), "role", "presentation");
for (const e in this.toggles) {
const i = this.toggles[e]
, s = (t = this.connects[0]) == null ? void 0 : t.children[e];
f(i, "role", "tab"),
s && (i.id = Dt(this, i, `-tab-${e}`),
s.id = Dt(this, s, `-tabpanel-${e}`),
f(i, "aria-controls", s.id),
f(s, {
role: "tabpanel",
"aria-labelledby": i.id
}))
}
f(this.$el, "aria-orientation", _(this.$el, this.selVertical) ? "vertical" : null)
},
methods: {
index() {
return $t(this.children, t=>B(t, this.cls))
},
show(t) {
const e = this.toggles.filter(r=>!_(r, ls))
, i = this.index()
, s = ct(!qe(t) || v(e, t) ? t : 0, e, ct(this.toggles[i], e))
, n = ct(e[s], this.toggles);
this.children.forEach((r,a)=>{
j(r, this.cls, n === a),
f(this.toggles[a], {
"aria-selected": n === a,
tabindex: n === a ? null : -1
})
}
);
const o = i >= 0 && i !== s;
this.connects.forEach(async({children: r})=>{
await this.toggleElement(k(r).filter(a=>B(a, this.cls)), !1, o),
await this.toggleElement(r[n], !0, o)
}
)
}
}
}
, Ua = {
mixins: [st],
extends: An,
props: {
media: Boolean
},
data: {
media: 960,
attrItem: "bdt-tab-item",
selVertical: ".bdt-tab-left,.bdt-tab-right"
},
connected() {
const t = B(this.$el, "bdt-tab-left") ? "bdt-tab-left" : B(this.$el, "bdt-tab-right") ? "bdt-tab-right" : !1;
t && this.$create("toggle", this.$el, {
cls: t,
mode: "media",
media: this.media
})
}
};
const tl = 32;
var el = {
mixins: [Oe, mi, Yt],
args: "target",
props: {
href: String,
target: null,
mode: "list",
queued: Boolean
},
data: {
href: !1,
target: !1,
mode: "click",
queued: !0
},
computed: {
target({href: t, target: e}, i) {
return e = Se(e || t, i),
e.length && e || [i]
}
},
connected() {
v(this.mode, "media") || (Je(this.$el) || f(this.$el, "tabindex", "0"),
!this.cls && X(this.$el, "a") && f(this.$el, "role", "button")),
this.lazyload(this.$el, ()=>this.target)
},
events: [{
name: gt,
filter() {
return v(this.mode, "hover")
},
handler(t) {
this._preventClick = null,
!(!Tt(t) || this._showState || this.$el.disabled) && (m(this.$el, "focus"),
L(document, gt, ()=>m(this.$el, "blur"), !0, e=>!D(e.target, this.$el)),
v(this.mode, "click") && (this._preventClick = !0))
}
}, {
name: `${At} ${qt} focus blur`,
filter() {
return v(this.mode, "hover")
},
handler(t) {
if (Tt(t) || this.$el.disabled)
return;
const e = v([At, "focus"], t.type)
, i = this.isToggled(this.target);
if (!(!e && (t.type === qt && _(this.$el, ":focus") || t.type === "blur" && _(this.$el, ":hover")))) {
if (this._showState && e && i !== this._showState) {
e || (this._showState = null);
return
}
this._showState = e ? i : null,
this.toggle(`toggle${e ? "show" : "hide"}`)
}
}
}, {
name: "keydown",
filter() {
return v(this.mode, "click") && !X(this.$el, "input")
},
handler(t) {
t.keyCode === tl && (t.preventDefault(),
this.$el.click())
}
}, {
name: "click",
filter() {
return ["click", "hover"].some(t=>v(this.mode, t))
},
handler(t) {
let e;
(this._preventClick || Y(t.target, 'a[href="#"], a[href=""]') || (e = Y(t.target, "a[href]")) && (!this.isToggled(this.target) || e.hash && _(this.target, e.hash))) && t.preventDefault(),
!this._preventClick && v(this.mode, "click") && this.toggle()
}
}, {
name: "mediachange",
filter() {
return v(this.mode, "media")
},
el() {
return this.target
},
handler(t, e) {
e.matches ^ this.isToggled(this.target) && this.toggle()
}
}],
methods: {
async toggle(t) {
if (!m(this.target, t || "toggle", [this]))
return;
if (wt(this.$el, "aria-expanded") && f(this.$el, "aria-expanded", !this.isToggled(this.target)),
!this.queued)
return this.toggleElement(this.target);
const e = this.target.filter(s=>B(s, this.clsLeave));
if (e.length) {
for (const s of this.target) {
const n = v(e, s);
this.toggleElement(s, n, n)
}
return
}
const i = this.target.filter(this.isToggled);
await this.toggleElement(i, !1),
await this.toggleElement(this.target.filter(s=>!v(i, s)), !0)
}
}
}
, il = Object.freeze({
__proto__: null,
Accordion: rn,
Alert: yr,
Close: ma,
Cover: Sr,
Drop: cn,
DropParentIcon: Gt,
Dropdown: cn,
Dropnav: un,
FormCustom: Dr,
Grid: Mr,
HeightMatch: Fr,
HeightViewport: Wr,
Icon: ns,
Img: Ta,
Leader: Oa,
Margin: pn,
Marker: va,
Modal: za,
Nav: Ha,
NavParentIcon: da,
Navbar: La,
NavbarParentIcon: Gt,
NavbarToggleIcon: ga,
Offcanvas: Ra,
OverflowAuto: Va,
OverlayIcon: Gt,
PaginationNext: ba,
PaginationPrevious: $a,
Responsive: Ya,
Scroll: Ga,
Scrollspy: Ka,
ScrollspyNav: Za,
SearchIcon: fa,
SlidenavNext: kn,
SlidenavPrevious: kn,
Spinner: pa,
Sticky: Qa,
Svg: bn,
Switcher: An,
Tab: Ua,
Toggle: el,
Totop: wa,
Video: an
});
St(il, (t,e)=>it.component(e, t)),
mr(it);
const sl = ["days", "hours", "minutes", "seconds"];
var nl = {
mixins: [st],
props: {
date: String,
clsWrapper: String,
role: String
},
data: {
date: "",
clsWrapper: ".bdt-countdown-%unit%",
role: "timer"
},
connected() {
f(this.$el, "role", this.role),
this.date = $(Date.parse(this.$props.date)),
this.end = !1,
this.start()
},
disconnected() {
this.stop()
},
events: [{
name: "visibilitychange",
el() {
return document
},
handler() {
document.hidden ? this.stop() : this.start()
}
}],
methods: {
start() {
this.stop(),
this.update(),
this.timer || (m(this.$el, "countdownstart"),
this.timer = setInterval(this.update, 1e3))
},
stop() {
this.timer && (clearInterval(this.timer),
m(this.$el, "countdownstop"),
this.timer = null)
},
update() {
const t = ol(this.date);
t.total || (this.stop(),
this.end || (m(this.$el, "countdownend"),
this.end = !0));
for (const e of sl) {
const i = w(this.clsWrapper.replace("%unit%", e), this.$el);
if (!i)
continue;
let s = String(Math.trunc(t[e]));
s = s.length < 2 ? `0${s}` : s,
i.textContent !== s && (s = s.split(""),
s.length !== i.children.length && It(i, s.map(()=>"
").join("")),
s.forEach((n,o)=>i.children[o].textContent = n))
}
}
}
};
function ol(t) {
const e = Math.max(0, t - Date.now()) / 1e3;
return {
total: e,
seconds: e % 60,
minutes: e / 60 % 60,
hours: e / 60 / 60 % 24,
days: e / 60 / 60 / 24
}
}
const hs = "bdt-transition-leave"
, cs = "bdt-transition-enter";
function On(t, e, i, s=0) {
const n = vi(e, !0)
, o = {
opacity: 1
}
, r = {
opacity: 0
}
, a = u=>()=>n === vi(e) ? u() : Promise.reject()
, l = a(async()=>{
y(e, hs),
await Promise.all(Bn(e).map((u,d)=>new Promise(p=>setTimeout(()=>S.start(u, r, i / 2, "ease").then(p), d * s)))),
z(e, hs)
}
)
, c = a(async()=>{
const u = et(e);
y(e, cs),
t(),
h(E(e), {
opacity: 0
}),
await rl();
const d = E(e)
, p = et(e);
h(e, "alignContent", "flex-start"),
et(e, u);
const g = Bn(e);
h(d, r);
const T = g.map(async(F,M)=>{
await al(M * s),
await S.start(F, o, i / 2, "ease")
}
);
u !== p && T.push(S.start(e, {
height: p
}, i / 2 + g.length * s, "ease")),
await Promise.all(T).then(()=>{
z(e, cs),
n === vi(e) && (h(e, {
height: "",
alignContent: ""
}),
h(d, {
opacity: ""
}),
delete e.dataset.transition)
}
)
}
);
return B(e, hs) ? Dn(e).then(c) : B(e, cs) ? Dn(e).then(l).then(c) : l().then(c)
}
function vi(t, e) {
return e && (t.dataset.transition = 1 + vi(t)),
kt(t.dataset.transition) || 0
}
function Dn(t) {
return Promise.all(E(t).filter(S.inProgress).map(e=>new Promise(i=>L(e, "transitionend transitioncanceled", i))))
}
function Bn(t) {
return is(E(t)).reduce((e,i)=>e.concat(Ve(i.filter(s=>Zi(s)), "offsetLeft")), [])
}
function rl() {
return new Promise(t=>requestAnimationFrame(t))
}
function al(t) {
return new Promise(e=>setTimeout(e, t))
}
async function ll(t, e, i) {
await zn();
let s = E(e);
const n = s.map(p=>Mn(p, !0))
, o = {
...h(e, ["height", "padding"]),
display: "block"
};
await Promise.all(s.concat(e).map(S.cancel)),
t(),
s = s.concat(E(e).filter(p=>!v(s, p))),
await Promise.resolve(),
G.flush();
const r = f(e, "style")
, a = h(e, ["height", "padding"])
, [l,c] = hl(e, s, n)
, u = s.map(p=>({
style: f(p, "style")
}));
s.forEach((p,g)=>c[g] && h(p, c[g])),
h(e, o),
m(e, "scroll"),
G.flush(),
await zn();
const d = s.map((p,g)=>A(p) === e && S.start(p, l[g], i, "ease")).concat(S.start(e, a, i, "ease"));
try {
await Promise.all(d),
s.forEach((p,g)=>{
f(p, u[g]),
A(p) === e && h(p, "display", l[g].opacity === 0 ? "none" : "")
}
),
f(e, "style", r)
} catch {
f(s, "style", ""),
cl(e, o)
}
}
function Mn(t, e) {
const i = h(t, "zIndex");
return q(t) ? {
display: "",
opacity: e ? h(t, "opacity") : "0",
pointerEvents: "none",
position: "absolute",
zIndex: i === "auto" ? oe(t) : i,
...Nn(t)
} : !1
}
function hl(t, e, i) {
const s = e.map((o,r)=>A(o) && r in i ? i[r] ? q(o) ? Nn(o) : {
opacity: 0
} : {
opacity: q(o) ? 1 : 0
} : !1)
, n = s.map((o,r)=>{
const a = A(e[r]) === t && (i[r] || Mn(e[r]));
if (!a)
return !1;
if (!o)
delete a.opacity;
else if (!("opacity"in o)) {
const {opacity: l} = a;
l % 1 ? o.opacity = 1 : delete a.opacity
}
return a
}
);
return [s, n]
}
function cl(t, e) {
for (const i in e)
h(t, i, "")
}
function Nn(t) {
const {height: e, width: i} = I(t);
return {
height: e,
width: i,
transform: "",
...ti(t),
...h(t, ["marginTop", "marginLeft"])
}
}
function zn() {
return new Promise(t=>requestAnimationFrame(t))
}
var Fn = {
props: {
duration: Number,
animation: Boolean
},
data: {
duration: 150,
animation: "slide"
},
methods: {
animate(t, e=this.$el) {
const i = this.animation;
return (i === "fade" ? On : i === "delayed-fade" ? (...n)=>On(...n, 40) : i ? ll : ()=>(t(),
Promise.resolve()))(t, e, this.duration).catch(P)
}
}
}
, ul = {
mixins: [Fn],
args: "target",
props: {
target: Boolean,
selActive: Boolean
},
data: {
target: null,
selActive: !1,
attrItem: "bdt-filter-control",
cls: "bdt-active",
duration: 250
},
computed: {
toggles: {
get({attrItem: t}, e) {
return O(`[${t}],[data-${t}]`, e)
},
watch(t) {
this.updateState();
const e = O(this.selActive, this.$el);
for (const i of t) {
this.selActive !== !1 && j(i, this.cls, v(e, i));
const s = wl(i);
X(s, "a") && f(s, "role", "button")
}
},
immediate: !0
},
children: {
get({target: t}, e) {
return O(`${t} > *`, e)
},
watch(t, e) {
e && !gl(t, e) && this.updateState()
},
immediate: !0
}
},
events: [{
name: "click keydown",
delegate() {
return `[${this.attrItem}],[data-${this.attrItem}]`
},
handler(t) {
t.type === "keydown" && t.keyCode !== C.SPACE || Y(t.target, "a,button") && (t.preventDefault(),
this.apply(t.current))
}
}],
methods: {
apply(t) {
const e = this.getState()
, i = Ln(t, this.attrItem, this.getState());
dl(e, i) || this.setState(i)
},
getState() {
return this.toggles.filter(t=>B(t, this.cls)).reduce((t,e)=>Ln(e, this.attrItem, t), {
filter: {
"": ""
},
sort: []
})
},
async setState(t, e=!0) {
t = {
filter: {
"": ""
},
sort: [],
...t
},
m(this.$el, "beforeFilter", [this, t]);
for (const i of this.toggles)
j(i, this.cls, pl(i, this.attrItem, t));
await Promise.all(O(this.target, this.$el).map(i=>{
const s = ()=>{
fl(t, i, E(i)),
this.$update(this.$el)
}
;
return e ? this.animate(s, i) : s()
}
)),
m(this.$el, "afterFilter", [this])
},
updateState() {
G.write(()=>this.setState(this.getState(), !1))
}
}
};
function Hn(t, e) {
return de(tt(t, e), ["filter"])
}
function dl(t, e) {
return ["filter", "sort"].every(i=>be(t[i], e[i]))
}
function fl(t, e, i) {
const s = ml(t);
i.forEach(r=>h(r, "display", s && !_(r, s) ? "none" : ""));
const [n,o] = t.sort;
if (n) {
const r = vl(i, n, o);
be(r, i) || W(e, r)
}
}
function Ln(t, e, i) {
const {filter: s, group: n, sort: o, order: r="asc"} = Hn(t, e);
return (s || V(o)) && (n ? s ? (delete i.filter[""],
i.filter[n] = s) : (delete i.filter[n],
(we(i.filter) || ""in i.filter) && (i.filter = {
"": s || ""
})) : i.filter = {
"": s || ""
}),
V(o) || (i.sort = [o, r]),
i
}
function pl(t, e, {filter: i={
"": ""
}, sort: [s,n]}) {
const {filter: o="", group: r="", sort: a, order: l="asc"} = Hn(t, e);
return V(a) ? r in i && o === i[r] || !o && r && !(r in i) && !i[""] : s === a && n === l
}
function gl(t, e) {
return t.length === e.length && t.every(i=>e.includes(i))
}
function ml({filter: t}) {
let e = "";
return St(t, i=>e += i || ""),
e
}
function vl(t, e, i) {
return [...t].sort((s,n)=>tt(s, e).localeCompare(tt(n, e), void 0, {
numeric: !0
}) * (i === "asc" || -1))
}
function wl(t) {
return w("a,button", t) || t
}
var us = {
slide: {
show(t) {
return [{
transform: H(t * -100)
}, {
transform: H()
}]
},
percent(t) {
return ze(t)
},
translate(t, e) {
return [{
transform: H(e * -100 * t)
}, {
transform: H(e * 100 * (1 - t))
}]
}
}
};
function ze(t) {
return Math.abs(h(t, "transform").split(",")[4] / t.offsetWidth) || 0
}
function H(t=0, e="%") {
return t += t ? e : "",
`translate3d(${t}, 0, 0)`
}
function fe(t) {
return `scale3d(${t}, ${t}, 1)`
}
var Wn = {
...us,
fade: {
show() {
return [{
opacity: 0
}, {
opacity: 1
}]
},
percent(t) {
return 1 - h(t, "opacity")
},
translate(t) {
return [{
opacity: 1 - t
}, {
opacity: t
}]
}
},
scale: {
show() {
return [{
opacity: 0,
transform: fe(1 - .2)
}, {
opacity: 1,
transform: fe(1)
}]
},
percent(t) {
return 1 - h(t, "opacity")
},
translate(t) {
return [{
opacity: 1 - t,
transform: fe(1 - .2 * t)
}, {
opacity: t,
transform: fe(1 - .2 + .2 * t)
}]
}
}
};
function bl(t, e, i, {animation: s, easing: n}) {
const {percent: o, translate: r, show: a=P} = s
, l = a(i)
, c = new Xe;
return {
dir: i,
show(u, d=0, p) {
const g = p ? "linear" : n;
return u -= Math.round(u * U(d, -1, 1)),
this.translate(d),
wi(e, "itemin", {
percent: d,
duration: u,
timing: g,
dir: i
}),
wi(t, "itemout", {
percent: 1 - d,
duration: u,
timing: g,
dir: i
}),
Promise.all([S.start(e, l[1], u, g), S.start(t, l[0], u, g)]).then(()=>{
this.reset(),
c.resolve()
}
, P),
c.promise
},
cancel() {
S.cancel([e, t])
},
reset() {
for (const u in l[0])
h([e, t], u, "")
},
forward(u, d=this.percent()) {
return S.cancel([e, t]),
this.show(u, d, !0)
},
translate(u) {
this.reset();
const d = r(u, i);
h(e, d[1]),
h(t, d[0]),
wi(e, "itemtranslatein", {
percent: u,
dir: i
}),
wi(t, "itemtranslateout", {
percent: 1 - u,
dir: i
})
},
percent() {
return o(t || e, e, i)
},
getDistance() {
return t == null ? void 0 : t.offsetWidth
}
}
}
function wi(t, e, i) {
m(t, Ft(e, !1, !1, i))
}
var $l = {
i18n: {
next: "Next slide",
previous: "Previous slide",
slideX: "Slide %s",
slideLabel: "%s of %s"
},
data: {
selNav: !1
},
computed: {
nav: {
get({selNav: t}, e) {
return w(t, e)
},
watch(t, e) {
f(t, "role", "tablist"),
e && this.$emit()
},
immediate: !0
},
selNavItem({attrItem: t}) {
return `[${t}],[data-${t}]`
},
navItems: {
get(t, e) {
return O(this.selNavItem, e)
},
watch() {
this.$emit()
}
}
},
connected() {
f(this.$el, "aria-roledescription", "carousel")
},
update: [{
write() {
this.slides.forEach((t,e)=>f(t, {
role: this.nav ? "tabpanel" : "group",
"aria-label": this.t("slideLabel", e + 1, this.length),
"aria-roledescription": this.nav ? null : "slide"
})),
this.nav && this.length !== this.nav.children.length && It(this.nav, this.slides.map((t,e)=>`
`).join("")),
f(E(this.nav).concat(this.list), "role", "presentation");
for (const t of this.navItems) {
const e = tt(t, this.attrItem)
, i = w("a,button", t) || t;
let s, n = null;
if (vt(e)) {
const o = kt(e)
, r = this.slides[o];
r && (r.id || (r.id = Dt(this, r, `-item-${e}`)),
n = r.id),
s = this.t("slideX", $(e) + 1),
f(i, "role", "tab")
} else
this.list && (this.list.id || (this.list.id = Dt(this, this.list, "-items")),
n = this.list.id),
s = this.t(e);
f(i, {
"aria-controls": n,
"aria-label": f(i, "aria-label") || s
})
}
}
}, {
write() {
this.navItems.concat(this.nav).forEach(t=>t && (t.hidden = !this.maxIndex)),
this.updateNav()
},
events: ["resize"]
}],
events: [{
name: "click keydown",
delegate() {
return this.selNavItem
},
handler(t) {
Y(t.target, "a,button") && (t.type === "click" || t.keyCode === C.SPACE) && (t.preventDefault(),
this.show(tt(t.current, this.attrItem)))
}
}, {
name: "itemshow",
handler: "updateNav"
}, {
name: "keydown",
delegate() {
return this.selNavItem
},
handler(t) {
const {current: e, keyCode: i} = t
, s = tt(e, this.attrItem);
if (!vt(s))
return;
let n = i === C.HOME ? 0 : i === C.END ? "last" : i === C.LEFT ? "previous" : i === C.RIGHT ? "next" : -1;
~n && (t.preventDefault(),
this.show(n))
}
}],
methods: {
updateNav() {
const t = this.getValidIndex();
let e, i;
for (const s of this.navItems) {
const n = tt(s, this.attrItem)
, o = w("a,button", s) || s;
if (vt(n)) {
const a = kt(n) === t;
j(s, this.clsActive, a),
f(o, {
"aria-selected": a,
tabindex: a ? null : -1
}),
a && (i = o),
e = e || _(o, ":focus")
} else
j(s, "bdt-invisible", this.finite && (n === "previous" && t === 0 || n === "next" && t >= this.maxIndex));
e && i && i.focus()
}
}
}
};
const ds = {
passive: !1,
capture: !0
}
, Rn = {
passive: !0,
capture: !0
}
, xl = "touchstart mousedown"
, fs = "touchmove mousemove"
, jn = "touchend touchcancel mouseup click input scroll";
var yl = {
props: {
draggable: Boolean
},
data: {
draggable: !0,
threshold: 10
},
created() {
for (const t of ["start", "move", "end"]) {
const e = this[t];
this[t] = i=>{
const s = re(i).x * (J ? -1 : 1);
this.prevPos = s === this.pos ? this.prevPos : this.pos,
this.pos = s,
e(i)
}
}
},
events: [{
name: xl,
passive: !0,
delegate() {
return `${this.selList} > *`
},
handler(t) {
!this.draggable || !Tt(t) && kl(t.target) || Y(t.target, xe) || t.button > 0 || this.length < 2 || this.start(t)
}
}, {
name: "dragstart",
handler(t) {
t.preventDefault()
}
}, {
name: fs,
el() {
return this.list
},
handler: P,
...ds
}],
methods: {
start() {
this.drag = this.pos,
this._transitioner ? (this.percent = this._transitioner.percent(),
this.drag += this._transitioner.getDistance() * this.percent * this.dir,
this._transitioner.cancel(),
this._transitioner.translate(this.percent),
this.dragging = !0,
this.stack = []) : this.prevIndex = this.index,
x(document, fs, this.move, ds),
x(document, jn, this.end, Rn),
h(this.list, "userSelect", "none")
},
move(t) {
const e = this.pos - this.drag;
if (e === 0 || this.prevPos === this.pos || !this.dragging && Math.abs(e) < this.threshold)
return;
h(this.list, "pointerEvents", "none"),
t.cancelable && t.preventDefault(),
this.dragging = !0,
this.dir = e < 0 ? 1 : -1;
const {slides: i} = this;
let {prevIndex: s} = this
, n = Math.abs(e)
, o = this.getIndex(s + this.dir, s)
, r = this._getDistance(s, o) || i[s].offsetWidth;
for (; o !== s && n > r; )
this.drag -= r * this.dir,
s = o,
n -= r,
o = this.getIndex(s + this.dir, s),
r = this._getDistance(s, o) || i[s].offsetWidth;
this.percent = n / r;
const a = i[s]
, l = i[o]
, c = this.index !== o
, u = s === o;
let d;
[this.index, this.prevIndex].filter(p=>!v([o, s], p)).forEach(p=>{
m(i[p], "itemhidden", [this]),
u && (d = !0,
this.prevIndex = s)
}
),
(this.index === s && this.prevIndex !== s || d) && m(i[this.index], "itemshown", [this]),
c && (this.prevIndex = s,
this.index = o,
!u && m(a, "beforeitemhide", [this]),
m(l, "beforeitemshow", [this])),
this._transitioner = this._translate(Math.abs(this.percent), a, !u && l),
c && (!u && m(a, "itemhide", [this]),
m(l, "itemshow", [this]))
},
end() {
if (zt(document, fs, this.move, ds),
zt(document, jn, this.end, Rn),
this.dragging)
if (this.dragging = null,
this.index === this.prevIndex)
this.percent = 1 - this.percent,
this.dir *= -1,
this._show(!1, this.index, !0),
this._transitioner = null;
else {
const t = (J ? this.dir * (J ? 1 : -1) : this.dir) < 0 == this.prevPos > this.pos;
this.index = t ? this.index : this.prevIndex,
t && (this.percent = 1 - this.percent),
this.show(this.dir > 0 && !t || this.dir < 0 && t ? "next" : "previous", !0)
}
h(this.list, {
userSelect: "",
pointerEvents: ""
}),
this.drag = this.percent = null
}
}
};
function kl(t) {
return h(t, "userSelect") !== "none" && k(t.childNodes).some(e=>e.nodeType === 3 && e.textContent.trim())
}
var Sl = {
props: {
autoplay: Boolean,
autoplayInterval: Number,
pauseOnHover: Boolean
},
data: {
autoplay: !1,
autoplayInterval: 7e3,
pauseOnHover: !0
},
connected() {
f(this.list, "aria-live", "polite"),
this.autoplay && this.startAutoplay()
},
disconnected() {
this.stopAutoplay()
},
update() {
f(this.slides, "tabindex", "-1")
},
events: [{
name: "visibilitychange",
el() {
return document
},
filter() {
return this.autoplay
},
handler() {
document.hidden ? this.stopAutoplay() : this.startAutoplay()
}
}, {
name: `${At} focusin`,
filter() {
return this.autoplay
},
handler: "stopAutoplay"
}, {
name: `${qt} focusout`,
filter() {
return this.autoplay
},
handler: "startAutoplay"
}],
methods: {
startAutoplay() {
this.draggable && _(this.$el, ":focus-within") || this.pauseOnHover && _(this.$el, ":hover") || (this.stopAutoplay(),
this.interval = setInterval(()=>!this.stack.length && this.show("next"), this.autoplayInterval),
f(this.list, "aria-live", "off"))
},
stopAutoplay() {
clearInterval(this.interval),
f(this.list, "aria-live", "polite")
}
}
}
, qn = {
mixins: [Sl, yl, $l, bt, ss],
props: {
clsActivated: Boolean,
easing: String,
index: Number,
finite: Boolean,
velocity: Number
},
data: ()=>({
easing: "ease",
finite: !1,
velocity: 1,
index: 0,
prevIndex: -1,
stack: [],
percent: 0,
clsActive: "bdt-active",
clsActivated: !1,
Transitioner: !1,
transitionOptions: {}
}),
connected() {
this.prevIndex = -1,
this.index = this.getValidIndex(this.$props.index),
this.stack = []
},
disconnected() {
z(this.slides, this.clsActive)
},
computed: {
duration({velocity: t}, e) {
return Vn(e.offsetWidth / t)
},
list({selList: t}, e) {
return w(t, e)
},
maxIndex() {
return this.length - 1
},
slides: {
get() {
return E(this.list)
},
watch() {
this.$emit()
}
},
length() {
return this.slides.length
}
},
methods: {
show(t, e=!1) {
var i;
if (this.dragging || !this.length)
return;
const {stack: s} = this
, n = e ? 0 : s.length
, o = ()=>{
s.splice(n, 1),
s.length && this.show(s.shift(), !0)
}
;
if (s[e ? "unshift" : "push"](t),
!e && s.length > 1) {
s.length === 2 && ((i = this._transitioner) == null || i.forward(Math.min(this.duration, 200)));
return
}
const r = this.getIndex(this.index)
, a = B(this.slides, this.clsActive) && this.slides[r]
, l = this.getIndex(t, this.index)
, c = this.slides[l];
if (a === c) {
o();
return
}
if (this.dir = Tl(t, r),
this.prevIndex = r,
this.index = l,
a && !m(a, "beforeitemhide", [this]) || !m(c, "beforeitemshow", [this, a])) {
this.index = this.prevIndex,
o();
return
}
const u = this._show(a, c, e).then(()=>{
a && m(a, "itemhidden", [this]),
m(c, "itemshown", [this]),
s.shift(),
this._transitioner = null,
requestAnimationFrame(()=>s.length && this.show(s.shift(), !0))
}
);
return a && m(a, "itemhide", [this]),
m(c, "itemshow", [this]),
u
},
getIndex(t=this.index, e=this.index) {
return U(ct(t, this.slides, e, this.finite), 0, this.maxIndex)
},
getValidIndex(t=this.index, e=this.prevIndex) {
return this.getIndex(t, e)
},
_show(t, e, i) {
if (this._transitioner = this._getTransitioner(t, e, this.dir, {
easing: i ? e.offsetWidth < 600 ? "cubic-bezier(0.25, 0.46, 0.45, 0.94)" : "cubic-bezier(0.165, 0.84, 0.44, 1)" : this.easing,
...this.transitionOptions
}),
!i && !t)
return this._translate(1),
Promise.resolve();
const {length: s} = this.stack;
return this._transitioner[s > 1 ? "forward" : "show"](s > 1 ? Math.min(this.duration, 75 + 75 / (s - 1)) : this.duration, this.percent)
},
_getDistance(t, e) {
return this._getTransitioner(t, t !== e && e).getDistance()
},
_translate(t, e=this.prevIndex, i=this.index) {
const s = this._getTransitioner(e === i ? !1 : e, i);
return s.translate(t),
s
},
_getTransitioner(t=this.prevIndex, e=this.index, i=this.dir || 1, s=this.transitionOptions) {
return new this.Transitioner(ee(t) ? this.slides[t] : t,ee(e) ? this.slides[e] : e,i * (J ? -1 : 1),s)
}
}
};
function Tl(t, e) {
return t === "next" ? 1 : t === "previous" || t < e ? -1 : 1
}
function Vn(t) {
return .5 * t + 300
}
var Yn = {
mixins: [qn],
props: {
animation: String
},
data: {
animation: "slide",
clsActivated: "bdt-transition-active",
Animations: us,
Transitioner: bl
},
computed: {
animation({animation: t, Animations: e}) {
return {
...e[t] || e.slide,
name: t
}
},
transitionOptions() {
return {
animation: this.animation
}
}
},
events: {
beforeitemshow({target: t}) {
y(t, this.clsActive)
},
itemshown({target: t}) {
y(t, this.clsActivated)
},
itemhidden({target: t}) {
z(t, this.clsActive, this.clsActivated)
}
}
}
, Gn = {
mixins: [rs, Yn],
functional: !0,
props: {
delayControls: Number,
preload: Number,
videoAutoplay: Boolean,
template: String
},
data: ()=>({
preload: 1,
videoAutoplay: !1,
delayControls: 3e3,
items: [],
cls: "bdt-open",
clsPage: "bdt-lightbox-page",
selList: ".bdt-lightbox-items",
attrItem: "bdt-lightbox-item",
selClose: ".bdt-close-large",
selCaption: ".bdt-lightbox-caption",
pauseOnHover: !1,
velocity: 2,
Animations: Wn,
template: '
'
}),
created() {
const t = w(this.template)
, e = w(this.selList, t);
this.items.forEach(()=>W(e, "
"));
const i = w("[bdt-close]", t)
, s = this.t("close");
i && s && (i.dataset.i18n = JSON.stringify({
label: s
})),
this.$mount(W(this.container, t))
},
computed: {
caption({selCaption: t}, e) {
return w(t, e)
}
},
events: [{
name: `${ii} ${gt} keydown`,
handler: "showControls"
}, {
name: "click",
self: !0,
delegate() {
return `${this.selList} > *`
},
handler(t) {
t.defaultPrevented || this.hide()
}
}, {
name: "shown",
self: !0,
handler() {
this.showControls()
}
}, {
name: "hide",
self: !0,
handler() {
this.hideControls(),
z(this.slides, this.clsActive),
S.stop(this.slides)
}
}, {
name: "hidden",
self: !0,
handler() {
this.$destroy(!0)
}
}, {
name: "keyup",
el() {
return document
},
handler({keyCode: t}) {
if (!this.isToggled(this.$el) || !this.draggable)
return;
let e = -1;
t === C.LEFT ? e = "previous" : t === C.RIGHT ? e = "next" : t === C.HOME ? e = 0 : t === C.END && (e = "last"),
~e && this.show(e)
}
}, {
name: "beforeitemshow",
handler(t) {
this.isToggled() || (this.draggable = !1,
t.preventDefault(),
this.toggleElement(this.$el, !0, !1),
this.animation = Wn.scale,
z(t.target, this.clsActive),
this.stack.splice(1, 0, this.index))
}
}, {
name: "itemshow",
handler() {
It(this.caption, this.getItem().caption || "");
for (let t = -this.preload; t <= this.preload; t++)
this.loadItem(this.index + t)
}
}, {
name: "itemshown",
handler() {
this.draggable = this.$props.draggable
}
}, {
name: "itemload",
async handler(t, e) {
const {source: i, type: s, alt: n="", poster: o, attrs: r={}} = e;
if (this.setItem(e, ""),
!i)
return;
let a;
const l = {
allowfullscreen: "",
style: "max-width: 100%; box-sizing: border-box;",
"bdt-responsive": "",
"bdt-video": `${this.videoAutoplay}`
};
if (s === "image" || i.match(/\.(avif|jpe?g|jfif|a?png|gif|svg|webp)($|\?)/i)) {
const c = Fe("img", {
src: i,
alt: n,
...r
});
x(c, "load", ()=>this.setItem(e, c)),
x(c, "error", ()=>this.setError(e))
} else if (s === "video" || i.match(/\.(mp4|webm|ogv)($|\?)/i)) {
const c = Fe("video", {
src: i,
poster: o,
controls: "",
playsinline: "",
"bdt-video": `${this.videoAutoplay}`,
...r
});
x(c, "loadedmetadata", ()=>this.setItem(e, c)),
x(c, "error", ()=>this.setError(e))
} else if (s === "iframe" || i.match(/\.(html|php)($|\?)/i))
this.setItem(e, Fe("iframe", {
src: i,
allowfullscreen: "",
class: "bdt-lightbox-iframe",
...r
}));
else if (a = i.match(/\/\/(?:.*?youtube(-nocookie)?\..*?(?:[?&]v=|\/shorts\/)|youtu\.be\/)([\w-]{11})[&?]?(.*)?/))
this.setItem(e, Fe("iframe", {
src: `https://www.youtube${a[1] || ""}.com/embed/${a[2]}${a[3] ? `?${a[3]}` : ""}`,
width: 1920,
height: 1080,
...l,
...r
}));
else if (a = i.match(/\/\/.*?vimeo\.[a-z]+\/(\d+)[&?]?(.*)?/))
try {
const {height: c, width: u} = await (await fetch(`https://vimeo.com/api/oembed.json?maxwidth=1920&url=${encodeURI(i)}`, {
credentials: "omit"
})).json();
this.setItem(e, Fe("iframe", {
src: `https://player.vimeo.com/video/${a[1]}${a[2] ? `?${a[2]}` : ""}`,
width: u,
height: c,
...l,
...r
}))
} catch {
this.setError(e)
}
}
}],
methods: {
loadItem(t=this.index) {
const e = this.getItem(t);
this.getSlide(e).childElementCount || m(this.$el, "itemload", [e])
},
getItem(t=this.index) {
return this.items[ct(t, this.slides)]
},
setItem(t, e) {
m(this.$el, "itemloaded", [this, It(this.getSlide(t), e)])
},
getSlide(t) {
return this.slides[this.items.indexOf(t)]
},
setError(t) {
this.setItem(t, '')
},
showControls() {
clearTimeout(this.controlsTimer),
this.controlsTimer = setTimeout(this.hideControls, this.delayControls),
y(this.$el, "bdt-active", "bdt-transition-active")
},
hideControls() {
z(this.$el, "bdt-active", "bdt-transition-active")
}
}
};
function Fe(t, e) {
const i = Ht(`<${t}>`);
return f(i, e),
i
}
var Cl = {
install: _l,
props: {
toggle: String
},
data: {
toggle: "a"
},
computed: {
toggles: {
get({toggle: t}, e) {
return O(t, e)
},
watch(t) {
this.hide();
for (const e of t)
X(e, "a") && f(e, "role", "button")
},
immediate: !0
}
},
disconnected() {
this.hide()
},
events: [{
name: "click",
delegate() {
return `${this.toggle}:not(.bdt-disabled)`
},
handler(t) {
t.preventDefault(),
this.show(t.current)
}
}],
methods: {
show(t) {
const e = $s(this.toggles.map(Xn), "source");
if (te(t)) {
const {source: i} = Xn(t);
t = $t(e, ({source: s})=>i === s)
}
return this.panel = this.panel || this.$create("lightboxPanel", {
...this.$props,
items: e
}),
x(this.panel.$el, "hidden", ()=>this.panel = null),
this.panel.show(t)
},
hide() {
var t;
return (t = this.panel) == null ? void 0 : t.hide()
}
}
};
function _l(t, e) {
t.lightboxPanel || t.component("lightboxPanel", Gn),
xt(e.props, t.component("lightboxPanel").options.props)
}
function Xn(t) {
const e = {};
for (const i of ["href", "caption", "type", "poster", "alt", "attrs"])
e[i === "href" ? "source" : i] = tt(t, i);
return e.attrs = de(e.attrs),
e
}
var El = {
mixins: [Be],
functional: !0,
args: ["message", "status"],
data: {
message: "",
status: "",
timeout: 5e3,
group: null,
pos: "top-center",
clsContainer: "bdt-notification",
clsClose: "bdt-notification-close",
clsMsg: "bdt-notification-message"
},
install: Il,
computed: {
marginProp({pos: t}) {
return `margin${ht(t, "top") ? "Top" : "Bottom"}`
},
startProps() {
return {
opacity: 0,
[this.marginProp]: -this.$el.offsetHeight
}
}
},
created() {
const t = w(`.${this.clsContainer}-${this.pos}`, this.container) || W(this.container, ``);
this.$mount(W(t, ``))
},
async connected() {
const t = $(h(this.$el, this.marginProp));
await S.start(h(this.$el, this.startProps), {
opacity: 1,
[this.marginProp]: t
}),
this.timeout && (this.timer = setTimeout(this.close, this.timeout))
},
events: {
click(t) {
Y(t.target, 'a[href="#"],a[href=""]') && t.preventDefault(),
this.close()
},
[At]() {
this.timer && clearTimeout(this.timer)
},
[qt]() {
this.timeout && (this.timer = setTimeout(this.close, this.timeout))
}
},
methods: {
async close(t) {
const e = i=>{
const s = A(i);
m(i, "close", [this]),
ot(i),
s != null && s.hasChildNodes() || ot(s)
}
;
this.timer && clearTimeout(this.timer),
t || await S.start(this.$el, this.startProps),
e(this.$el)
}
}
};
function Il(t) {
t.notification.closeAll = function(e, i) {
Ct(document.body, s=>{
const n = t.getComponent(s, "notification");
n && (!e || e === n.group) && n.close(i)
}
)
}
}
const bi = {
x: $i,
y: $i,
rotate: $i,
scale: $i,
color: ps,
backgroundColor: ps,
borderColor: ps,
blur: Jt,
hue: Jt,
fopacity: Jt,
grayscale: Jt,
invert: Jt,
saturate: Jt,
sepia: Jt,
opacity: Al,
stroke: Ol,
bgx: Zn,
bgy: Zn
}
, {keys: Jn} = Object;
var Kn = {
mixins: [mi],
props: eo(Jn(bi), "list"),
data: eo(Jn(bi), void 0),
computed: {
props(t, e) {
const i = {};
for (const n in t)
n in bi && !V(t[n]) && (i[n] = t[n].slice());
const s = {};
for (const n in i)
s[n] = bi[n](n, e, i[n], i);
return s
}
},
events: {
load() {
this.$emit()
}
},
methods: {
reset() {
for (const t in this.getCss(0))
h(this.$el, t, "")
},
getCss(t) {
const e = {
transform: "",
filter: ""
};
for (const i in this.props)
this.props[i](e, t);
return e.willChange = Object.keys(e).filter(i=>e[i] !== "").join(","),
e
}
}
};
function $i(t, e, i) {
let s = yi(i) || {
x: "px",
y: "px",
rotate: "deg"
}[t] || "", n;
return t === "x" || t === "y" ? (t = `translate${_t(t)}`,
n = o=>$($(o).toFixed(s === "px" ? 0 : 6))) : t === "scale" && (s = "",
n = o=>yi([o]) ? rt(o, "width", e, !0) / e.offsetWidth : o),
i.length === 1 && i.unshift(t === "scale" ? 1 : 0),
i = pe(i, n),
(o,r)=>{
o.transform += ` ${t}(${He(i, r)}${s})`
}
}
function ps(t, e, i) {
return i.length === 1 && i.unshift(Le(e, t, "")),
i = pe(i, s=>Pl(e, s)),
(s,n)=>{
const [o,r,a] = to(i, n)
, l = o.map((c,u)=>(c += a * (r[u] - c),
u === 3 ? $(c) : parseInt(c, 10))).join(",");
s[t] = `rgba(${l})`
}
}
function Pl(t, e) {
return Le(t, "color", e).split(/[(),]/g).slice(1, -1).concat(1).slice(0, 4).map($)
}
function Jt(t, e, i) {
i.length === 1 && i.unshift(0);
const s = yi(i) || {
blur: "px",
hue: "deg"
}[t] || "%";
return t = {
fopacity: "opacity",
hue: "hue-rotate"
}[t] || t,
i = pe(i),
(n,o)=>{
const r = He(i, o);
n.filter += ` ${t}(${r + s})`
}
}
function Al(t, e, i) {
return i.length === 1 && i.unshift(Le(e, t, "")),
i = pe(i),
(s,n)=>{
s[t] = He(i, n)
}
}
function Ol(t, e, i) {
i.length === 1 && i.unshift(0);
const s = yi(i)
, n = sn(e);
return i = pe(i.reverse(), o=>(o = $(o),
s === "%" ? o * n / 100 : o)),
i.some(([o])=>o) ? (h(e, "strokeDasharray", n),
(o,r)=>{
o.strokeDashoffset = He(i, r)
}
) : P
}
function Zn(t, e, i, s) {
i.length === 1 && i.unshift(0);
const n = t === "bgy" ? "height" : "width";
s[t] = pe(i, a=>rt(a, n, e));
const o = ["bgx", "bgy"].filter(a=>a in s);
if (o.length === 2 && t === "bgx")
return P;
if (Le(e, "backgroundSize", "") === "cover")
return Dl(t, e, i, s);
const r = {};
for (const a of o)
r[a] = Qn(e, a);
return Un(o, r, s)
}
function Dl(t, e, i, s) {
const n = Bl(e);
if (!n.width)
return P;
const o = {
width: e.offsetWidth,
height: e.offsetHeight
}
, r = ["bgx", "bgy"].filter(u=>u in s)
, a = {};
for (const u of r) {
const d = s[u].map(([M])=>M)
, p = Math.min(...d)
, g = Math.max(...d)
, T = d.indexOf(p) < d.indexOf(g)
, F = g - p;
a[u] = `${(T ? -F : 0) - (T ? p : g)}px`,
o[u === "bgy" ? "height" : "width"] += F
}
const l = Ge.cover(n, o);
for (const u of r) {
const d = u === "bgy" ? "height" : "width"
, p = l[d] - o[d];
a[u] = `max(${Qn(e, u)},-${p}px) + ${a[u]}`
}
const c = Un(r, a, s);
return (u,d)=>{
c(u, d),
u.backgroundSize = `${l.width}px ${l.height}px`,
u.backgroundRepeat = "no-repeat"
}
}
function Qn(t, e) {
return Le(t, `background-position-${e.substr(-1)}`, "")
}
function Un(t, e, i) {
return function(s, n) {
for (const o of t) {
const r = He(i[o], n);
s[`background-position-${o.substr(-1)}`] = `calc(${e[o]} + ${r}px)`
}
}
}
const xi = {};
function Bl(t) {
const e = h(t, "backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/, "$1");
if (xi[e])
return xi[e];
const i = new Image;
return e && (i.src = e,
!i.naturalWidth) ? (i.onload = ()=>{
xi[e] = gs(i),
m(t, Ft("load", !1))
}
,
gs(i)) : xi[e] = gs(i)
}
function gs(t) {
return {
width: t.naturalWidth,
height: t.naturalHeight
}
}
function pe(t, e=$) {
const i = []
, {length: s} = t;
let n = 0;
for (let o = 0; o < s; o++) {
let[r,a] = N(t[o]) ? t[o].trim().split(" ") : [t[o]];
if (r = e(r),
a = a ? $(a) / 100 : null,
o === 0 ? a === null ? a = 0 : a && i.push([r, 0]) : o === s - 1 && (a === null ? a = 1 : a !== 1 && (i.push([r, a]),
a = 1)),
i.push([r, a]),
a === null)
n++;
else if (n) {
const l = i[o - n - 1][1]
, c = (a - l) / (n + 1);
for (let u = n; u > 0; u--)
i[o - u][1] = l + c * (n - u + 1);
n = 0
}
}
return i
}
function to(t, e) {
const i = $t(t.slice(1), ([,s])=>e <= s) + 1;
return [t[i - 1][0], t[i][0], (e - t[i - 1][1]) / (t[i][1] - t[i - 1][1])]
}
function He(t, e) {
const [i,s,n] = to(t, e);
return ee(i) ? i + Math.abs(i - s) * n * (i < s ? 1 : -1) : +s
}
const Ml = /^-?\d+(\S+)?/;
function yi(t, e) {
var i;
for (const s of t) {
const n = (i = s.match) == null ? void 0 : i.call(s, Ml);
if (n)
return n[1]
}
return e
}
function Le(t, e, i) {
const s = t.style[e]
, n = h(h(t, e, i), e);
return t.style[e] = s,
n
}
function eo(t, e) {
return t.reduce((i,s)=>(i[s] = e,
i), {})
}
var Nl = {
mixins: [Kn, bt, ci],
props: {
target: String,
viewport: Number,
easing: Number,
start: String,
end: String
},
data: {
target: !1,
viewport: 1,
easing: 1,
start: 0,
end: 0
},
computed: {
target({target: t}, e) {
return io(t && ut(t, e) || e)
},
start({start: t}) {
return rt(t, "height", this.target, !0)
},
end({end: t, viewport: e}) {
return rt(t || (e = (1 - e) * 100) && `${e}vh+${e}%`, "height", this.target, !0)
}
},
resizeTargets() {
return [this.$el, this.target]
},
update: {
read({percent: t}, e) {
if (e.has("scroll") || (t = !1),
!q(this.$el))
return !1;
if (!this.matchMedia)
return;
const i = t;
return t = zl(Qi(this.target, this.start, this.end), this.easing),
{
percent: t,
style: i === t ? !1 : this.getCss(t)
}
},
write({style: t}) {
if (!this.matchMedia) {
this.reset();
return
}
t && h(this.$el, t)
},
events: ["scroll", "resize"]
}
};
function zl(t, e) {
return e >= 0 ? Math.pow(t, e + 1) : 1 - Math.pow(1 - t, 1 - e)
}
function io(t) {
return t ? "offsetTop"in t ? t : io(A(t)) : document.documentElement
}
var so = {
update: {
write() {
if (this.stack.length || this.dragging)
return;
const t = this.getValidIndex(this.index);
!~this.prevIndex || this.index !== t ? this.show(t) : this._translate(1, this.prevIndex, this.index)
},
events: ["resize"]
}
}
, no = {
mixins: [Oe],
connected() {
this.lazyload(this.slides, this.getAdjacentSlides)
}
};
function Fl(t, e, i, {center: s, easing: n, list: o}) {
const r = new Xe
, a = t ? We(t, o, s) : We(e, o, s) + b(e).width * i
, l = e ? We(e, o, s) : a + b(t).width * i * (J ? -1 : 1);
return {
dir: i,
show(c, u=0, d) {
const p = d ? "linear" : n;
return c -= Math.round(c * U(u, -1, 1)),
this.translate(u),
u = t ? u : U(u, 0, 1),
ms(this.getItemIn(), "itemin", {
percent: u,
duration: c,
timing: p,
dir: i
}),
t && ms(this.getItemIn(!0), "itemout", {
percent: 1 - u,
duration: c,
timing: p,
dir: i
}),
S.start(o, {
transform: H(-l * (J ? -1 : 1), "px")
}, c, p).then(r.resolve, P),
r.promise
},
cancel() {
S.cancel(o)
},
reset() {
h(o, "transform", "")
},
forward(c, u=this.percent()) {
return S.cancel(o),
this.show(c, u, !0)
},
translate(c) {
const u = this.getDistance() * i * (J ? -1 : 1);
h(o, "transform", H(U(-l + (u - u * c), -ki(o), b(o).width) * (J ? -1 : 1), "px"));
const d = this.getActives()
, p = this.getItemIn()
, g = this.getItemIn(!0);
c = t ? U(c, -1, 1) : 0;
for (const T of E(o)) {
const F = v(d, T)
, M = T === p
, Bt = T === g
, vs = M || !Bt && (F || i * (J ? -1 : 1) === -1 ^ Si(T, o) > Si(t || e));
ms(T, `itemtranslate${vs ? "in" : "out"}`, {
dir: i,
percent: Bt ? 1 - c : M ? c : F ? 1 : 0
})
}
},
percent() {
return Math.abs((h(o, "transform").split(",")[4] * (J ? -1 : 1) + a) / (l - a))
},
getDistance() {
return Math.abs(l - a)
},
getItemIn(c=!1) {
let u = this.getActives()
, d = ro(o, We(e || t, o, s));
if (c) {
const p = u;
u = d,
d = p
}
return d[$t(d, p=>!v(u, p))]
},
getActives() {
return ro(o, We(t || e, o, s))
}
}
}
function We(t, e, i) {
const s = Si(t, e);
return i ? s - Hl(t, e) : Math.min(s, oo(e))
}
function oo(t) {
return Math.max(0, ki(t) - b(t).width)
}
function ki(t) {
return Nt(E(t), e=>b(e).width)
}
function Hl(t, e) {
return b(e).width / 2 - b(t).width / 2
}
function Si(t, e) {
return t && (ti(t).left + (J ? b(t).width - b(e).width : 0)) * (J ? -1 : 1) || 0
}
function ro(t, e) {
e -= 1;
const i = b(t).width
, s = e + i + 2;
return E(t).filter(n=>{
const o = Si(n, t)
, r = o + Math.min(b(n).width, i);
return o >= e && r <= s
}
)
}
function ms(t, e, i) {
m(t, Ft(e, !1, !1, i))
}
var Ll = {
mixins: [st, qn, so, no],
props: {
center: Boolean,
sets: Boolean
},
data: {
center: !1,
sets: !1,
attrItem: "bdt-slider-item",
selList: ".bdt-slider-items",
selNav: ".bdt-slider-nav",
clsContainer: "bdt-slider-container",
Transitioner: Fl
},
computed: {
avgWidth() {
return ki(this.list) / this.length
},
finite({finite: t}) {
return t || Wl(this.list, this.center)
},
maxIndex() {
if (!this.finite || this.center && !this.sets)
return this.length - 1;
if (this.center)
return se(this.sets);
let t = 0;
const e = oo(this.list)
, i = $t(this.slides, s=>{
if (t >= e)
return !0;
t += b(s).width
}
);
return ~i ? i : this.length - 1
},
sets({sets: t}) {
if (!t)
return;
let e = 0;
const i = []
, s = b(this.list).width;
for (let n = 0; n < this.length; n++) {
const o = b(this.slides[n]).width;
e + o > s && (e = 0),
this.center ? e < s / 2 && e + o + b(this.slides[+n + 1]).width / 2 > s / 2 && (i.push(+n),
e = s / 2 - o / 2) : e === 0 && i.push(Math.min(+n, this.maxIndex)),
e += o
}
if (i.length)
return i
},
transitionOptions() {
return {
center: this.center,
list: this.list
}
}
},
connected() {
j(this.$el, this.clsContainer, !w(`.${this.clsContainer}`, this.$el))
},
update: {
write() {
for (const t of this.navItems) {
const e = kt(tt(t, this.attrItem));
e !== !1 && (t.hidden = !this.maxIndex || e > this.maxIndex || this.sets && !v(this.sets, e))
}
this.length && !this.dragging && !this.stack.length && (this.reorder(),
this._translate(1)),
this.updateActiveClasses()
},
events: ["resize"]
},
events: {
beforeitemshow(t) {
!this.dragging && this.sets && this.stack.length < 2 && !v(this.sets, this.index) && (this.index = this.getValidIndex());
const e = Math.abs(this.index - this.prevIndex + (this.dir > 0 && this.index < this.prevIndex || this.dir < 0 && this.index > this.prevIndex ? (this.maxIndex + 1) * this.dir : 0));
if (!this.dragging && e > 1) {
for (let s = 0; s < e; s++)
this.stack.splice(1, 0, this.dir > 0 ? "next" : "previous");
t.preventDefault();
return
}
const i = this.dir < 0 || !this.slides[this.prevIndex] ? this.index : this.prevIndex;
this.duration = Vn(this.avgWidth / this.velocity) * (b(this.slides[i]).width / this.avgWidth),
this.reorder()
},
itemshow() {
~this.prevIndex && y(this._getTransitioner().getItemIn(), this.clsActive)
},
itemshown() {
this.updateActiveClasses()
}
},
methods: {
reorder() {
if (this.finite) {
h(this.slides, "order", "");
return
}
const t = this.dir > 0 && this.slides[this.prevIndex] ? this.prevIndex : this.index;
if (this.slides.forEach((n,o)=>h(n, "order", this.dir > 0 && o < t ? 1 : this.dir < 0 && o >= this.index ? -1 : "")),
!this.center)
return;
const e = this.slides[t];
let i = b(this.list).width / 2 - b(e).width / 2
, s = 0;
for (; i > 0; ) {
const n = this.getIndex(--s + t, t)
, o = this.slides[n];
h(o, "order", n > t ? -2 : -1),
i -= b(o).width
}
},
updateActiveClasses() {
const t = this._getTransitioner(this.index).getActives()
, e = [this.clsActive, (!this.sets || v(this.sets, $(this.index))) && this.clsActivated || ""];
for (const i of this.slides) {
const s = v(t, i);
j(i, e, s),
f(i, "aria-hidden", !s),
f(O(ye, i), "tabindex", s ? null : -1)
}
},
getValidIndex(t=this.index, e=this.prevIndex) {
if (t = this.getIndex(t, e),
!this.sets)
return t;
let i;
do {
if (v(this.sets, t))
return t;
i = t,
t = this.getIndex(t + this.dir, e)
} while (t !== i);
return t
},
getAdjacentSlides() {
const {width: t} = b(this.list)
, e = -t
, i = t * 2
, s = b(this.slides[this.index]).width
, n = this.center ? t / 2 - s / 2 : 0
, o = new Set;
for (const r of [-1, 1]) {
let a = n + (r > 0 ? s : 0)
, l = 0;
do {
const c = this.slides[this.getIndex(this.index + r + l++ * r)];
a += b(c).width * r,
o.add(c)
} while (this.length > l && a > e && a < i)
}
return Array.from(o)
}
}
};
function Wl(t, e) {
if (!t || t.length < 2)
return !0;
const {width: i} = b(t);
if (!e)
return Math.ceil(ki(t)) < Math.trunc(i + Rl(t));
const s = E(t)
, n = Math.trunc(i / 2);
for (const o in s) {
const r = s[o]
, a = b(r).width
, l = new Set([r]);
let c = 0;
for (const u of [-1, 1]) {
let d = a / 2
, p = 0;
for (; d < n; ) {
const g = s[ct(+o + u + p++ * u, s)];
if (l.has(g))
return !0;
d += b(g).width,
l.add(g)
}
c = Math.max(c, a / 2 + b(s[ct(+o + u, s)]).width / 2 - (d - n))
}
if (c > Nt(s.filter(u=>!l.has(u)), u=>b(u).width))
return !0
}
return !1
}
function Rl(t) {
return Math.max(0, ...E(t).map(e=>b(e).width))
}
var ao = {
mixins: [Kn],
data: {
selItem: "!li"
},
beforeConnect() {
this.item = ut(this.selItem, this.$el)
},
disconnected() {
this.item = null
},
events: [{
name: "itemin itemout",
self: !0,
el() {
return this.item
},
handler({type: t, detail: {percent: e, duration: i, timing: s, dir: n}}) {
G.read(()=>{
if (!this.matchMedia)
return;
const o = this.getCss(ho(t, n, e))
, r = this.getCss(lo(t) ? .5 : n > 0 ? 1 : 0);
G.write(()=>{
h(this.$el, o),
S.start(this.$el, r, i, s).catch(P)
}
)
}
)
}
}, {
name: "transitioncanceled transitionend",
self: !0,
el() {
return this.item
},
handler() {
S.cancel(this.$el)
}
}, {
name: "itemtranslatein itemtranslateout",
self: !0,
el() {
return this.item
},
handler({type: t, detail: {percent: e, dir: i}}) {
G.read(()=>{
if (!this.matchMedia) {
this.reset();
return
}
const s = this.getCss(ho(t, i, e));
G.write(()=>h(this.$el, s))
}
)
}
}]
};
function lo(t) {
return Qt(t, "in")
}
function ho(t, e, i) {
return i /= 2,
lo(t) ^ e < 0 ? i : 1 - i
}
var jl = {
...us,
fade: {
show() {
return [{
opacity: 0,
zIndex: 0
}, {
zIndex: -1
}]
},
percent(t) {
return 1 - h(t, "opacity")
},
translate(t) {
return [{
opacity: 1 - t,
zIndex: 0
}, {
zIndex: -1
}]
}
},
scale: {
show() {
return [{
opacity: 0,
transform: fe(1 + .5),
zIndex: 0
}, {
zIndex: -1
}]
},
percent(t) {
return 1 - h(t, "opacity")
},
translate(t) {
return [{
opacity: 1 - t,
transform: fe(1 + .5 * t),
zIndex: 0
}, {
zIndex: -1
}]
}
},
pull: {
show(t) {
return t < 0 ? [{
transform: H(30),
zIndex: -1
}, {
transform: H(),
zIndex: 0
}] : [{
transform: H(-100),
zIndex: 0
}, {
transform: H(),
zIndex: -1
}]
},
percent(t, e, i) {
return i < 0 ? 1 - ze(e) : ze(t)
},
translate(t, e) {
return e < 0 ? [{
transform: H(30 * t),
zIndex: -1
}, {
transform: H(-100 * (1 - t)),
zIndex: 0
}] : [{
transform: H(-t * 100),
zIndex: 0
}, {
transform: H(30 * (1 - t)),
zIndex: -1
}]
}
},
push: {
show(t) {
return t < 0 ? [{
transform: H(100),
zIndex: 0
}, {
transform: H(),
zIndex: -1
}] : [{
transform: H(-30),
zIndex: -1
}, {
transform: H(),
zIndex: 0
}]
},
percent(t, e, i) {
return i > 0 ? 1 - ze(e) : ze(t)
},
translate(t, e) {
return e < 0 ? [{
transform: H(t * 100),
zIndex: 0
}, {
transform: H(-30 * (1 - t)),
zIndex: -1
}] : [{
transform: H(-30 * t),
zIndex: -1
}, {
transform: H(100 * (1 - t)),
zIndex: 0
}]
}
}
}
, ql = {
mixins: [st, Yn, so, no],
props: {
ratio: String,
minHeight: Number,
maxHeight: Number
},
data: {
ratio: "16:9",
minHeight: !1,
maxHeight: !1,
selList: ".bdt-slideshow-items",
attrItem: "bdt-slideshow-item",
selNav: ".bdt-slideshow-nav",
Animations: jl
},
update: {
read() {
if (!this.list)
return !1;
let[t,e] = this.ratio.split(":").map(Number);
return e = e * this.list.offsetWidth / t || 0,
this.minHeight && (e = Math.max(this.minHeight, e)),
this.maxHeight && (e = Math.min(this.maxHeight, e)),
{
height: e - ae(this.list, "height", "content-box")
}
},
write({height: t}) {
t > 0 && h(this.list, "minHeight", t)
},
events: ["resize"]
},
methods: {
getAdjacentSlides() {
return [1, -1].map(t=>this.slides[this.getIndex(this.index + t)])
}
}
}
, Vl = {
mixins: [st, Fn],
props: {
group: String,
threshold: Number,
clsItem: String,
clsPlaceholder: String,
clsDrag: String,
clsDragState: String,
clsBase: String,
clsNoDrag: String,
clsEmpty: String,
clsCustom: String,
handle: String
},
data: {
group: !1,
threshold: 5,
clsItem: "bdt-sortable-item",
clsPlaceholder: "bdt-sortable-placeholder",
clsDrag: "bdt-sortable-drag",
clsDragState: "bdt-drag",
clsBase: "bdt-sortable",
clsNoDrag: "bdt-sortable-nodrag",
clsEmpty: "bdt-sortable-empty",
clsCustom: "",
handle: !1,
pos: {}
},
created() {
for (const t of ["init", "start", "move", "end"]) {
const e = this[t];
this[t] = i=>{
xt(this.pos, re(i)),
e(i)
}
}
},
events: {
name: gt,
passive: !1,
handler: "init"
},
computed: {
target() {
return (this.$el.tBodies || [this.$el])[0]
},
items() {
return E(this.target)
},
isEmpty: {
get() {
return we(this.items)
},
watch(t) {
j(this.target, this.clsEmpty, t)
},
immediate: !0
},
handles: {
get({handle: t}, e) {
return t ? O(t, e) : this.items
},
watch(t, e) {
h(e, {
touchAction: "",
userSelect: ""
}),
h(t, {
touchAction: jt ? "none" : "",
userSelect: "none"
})
},
immediate: !0
}
},
update: {
write(t) {
if (!this.drag || !A(this.placeholder))
return;
const {pos: {x: e, y: i}, origin: {offsetTop: s, offsetLeft: n}, placeholder: o} = this;
h(this.drag, {
top: i - s,
left: e - n
});
const r = this.getSortable(document.elementFromPoint(e, i));
if (!r)
return;
const {items: a} = r;
if (a.some(S.inProgress))
return;
const l = Jl(a, {
x: e,
y: i
});
if (a.length && (!l || l === o))
return;
const c = this.getSortable(o)
, u = Kl(r.target, l, o, e, i, r === c && t.moved !== l);
u !== !1 && (u && o === u || (r !== c ? (c.remove(o),
t.moved = l) : delete t.moved,
r.insert(o, u),
this.touched.add(r)))
},
events: ["move"]
},
methods: {
init(t) {
const {target: e, button: i, defaultPrevented: s} = t
, [n] = this.items.filter(o=>D(e, o));
!n || s || i > 0 || Mi(e) || D(e, `.${this.clsNoDrag}`) || this.handle && !D(e, this.handle) || (t.preventDefault(),
this.touched = new Set([this]),
this.placeholder = n,
this.origin = {
target: e,
index: oe(n),
...this.pos
},
x(document, ii, this.move),
x(document, Pt, this.end),
this.threshold || this.start(t))
},
start(t) {
this.drag = Xl(this.$container, this.placeholder);
const {left: e, top: i} = this.placeholder.getBoundingClientRect();
xt(this.origin, {
offsetLeft: this.pos.x - e,
offsetTop: this.pos.y - i
}),
y(this.drag, this.clsDrag, this.clsCustom),
y(this.placeholder, this.clsPlaceholder),
y(this.items, this.clsItem),
y(document.documentElement, this.clsDragState),
m(this.$el, "start", [this, this.placeholder]),
Yl(this.pos),
this.move(t)
},
move(t) {
this.drag ? this.$emit("move") : (Math.abs(this.pos.x - this.origin.x) > this.threshold || Math.abs(this.pos.y - this.origin.y) > this.threshold) && this.start(t)
},
end() {
if (zt(document, ii, this.move),
zt(document, Pt, this.end),
!this.drag)
return;
Gl();
const t = this.getSortable(this.placeholder);
this === t ? this.origin.index !== oe(this.placeholder) && m(this.$el, "moved", [this, this.placeholder]) : (m(t.$el, "added", [t, this.placeholder]),
m(this.$el, "removed", [this, this.placeholder])),
m(this.$el, "stop", [this, this.placeholder]),
ot(this.drag),
this.drag = null;
for (const {clsPlaceholder: e, clsItem: i} of this.touched)
for (const s of this.touched)
z(s.items, e, i);
this.touched = null,
z(document.documentElement, this.clsDragState)
},
insert(t, e) {
y(this.items, this.clsItem);
const i = ()=>e ? Ke(e, t) : W(this.target, t);
this.animate(i)
},
remove(t) {
D(t, this.target) && this.animate(()=>ot(t))
},
getSortable(t) {
do {
const e = this.$getComponent(t, "sortable");
if (e && (e === this || this.group !== !1 && e.group === this.group))
return e
} while (t = A(t))
}
}
};
let co;
function Yl(t) {
let e = Date.now();
co = setInterval(()=>{
let {x: i, y: s} = t;
s += document.scrollingElement.scrollTop;
const n = (Date.now() - e) * .3;
e = Date.now(),
mt(document.elementFromPoint(i, t.y)).reverse().some(o=>{
let {scrollTop: r, scrollHeight: a} = o;
const {top: l, bottom: c, height: u} = at(o);
if (l < s && l + 35 > s)
r -= n;
else if (c > s && c - 35 < s)
r += n;
else
return;
if (r > 0 && r < a - u)
return o.scrollTop = r,
!0
}
)
}
, 15)
}
function Gl() {
clearInterval(co)
}
function Xl(t, e) {
let i;
if (X(e, "li", "tr")) {
i = w(""),
W(i, e.cloneNode(!0).children);
for (const s of e.getAttributeNames())
f(i, s, e.getAttribute(s))
} else
i = e.cloneNode(!0);
return W(t, i),
h(i, "margin", "0", "important"),
h(i, {
boxSizing: "border-box",
width: e.offsetWidth,
height: e.offsetHeight,
padding: h(e, "padding")
}),
et(i.firstElementChild, et(e.firstElementChild)),
i
}
function Jl(t, e) {
return t[$t(t, i=>Ye(e, i.getBoundingClientRect()))]
}
function Kl(t, e, i, s, n, o) {
if (!E(t).length)
return;
const r = e.getBoundingClientRect();
if (!o)
return Zl(t, i) || n < r.top + r.height / 2 ? e : e.nextElementSibling;
const a = i.getBoundingClientRect()
, l = uo([r.top, r.bottom], [a.top, a.bottom])
, [c,u,d,p] = l ? [s, "width", "left", "right"] : [n, "height", "top", "bottom"]
, g = a[u] < r[u] ? r[u] - a[u] : 0;
return a[d] < r[d] ? g && c < r[d] + g ? !1 : e.nextElementSibling : g && c > r[p] - g ? !1 : e
}
function Zl(t, e) {
const i = E(t).length === 1;
i && W(t, e);
const s = E(t)
, n = s.some((o,r)=>{
const a = o.getBoundingClientRect();
return s.slice(r + 1).some(l=>{
const c = l.getBoundingClientRect();
return !uo([a.left, a.right], [c.left, c.right])
}
)
}
);
return i && ot(e),
n
}
function uo(t, e) {
return t[1] > e[0] && e[1] > t[0]
}
var Ql = {
mixins: [Be, Yt, hn],
args: "title",
props: {
delay: Number,
title: String
},
data: {
pos: "top",
title: "",
delay: 0,
animation: ["bdt-animation-scale-up"],
duration: 100,
cls: "bdt-active"
},
beforeConnect() {
this.id = Dt(this),
this._hasTitle = wt(this.$el, "title"),
f(this.$el, {
title: "",
"aria-describedby": this.id
}),
Ul(this.$el)
},
disconnected() {
this.hide(),
f(this.$el, "title") || f(this.$el, "title", this._hasTitle ? this.title : null)
},
methods: {
show() {
this.isToggled(this.tooltip || null) || !this.title || (clearTimeout(this.showTimer),
this.showTimer = setTimeout(this._show, this.delay))
},
async hide() {
_(this.$el, "input:focus") || (clearTimeout(this.showTimer),
this.isToggled(this.tooltip || null) && (await this.toggleElement(this.tooltip, !1, !1),
ot(this.tooltip),
this.tooltip = null))
},
_show() {
this.tooltip = W(this.container, `
`),
x(this.tooltip, "toggled", (t,e)=>{
if (!e)
return;
const i = ()=>this.positionAt(this.tooltip, this.$el);
i();
const [s,n] = th(this.tooltip, this.$el, this.pos);
this.origin = this.axis === "y" ? `${ei(s)}-${n}` : `${n}-${ei(s)}`;
const o = [L(document, `keydown ${gt}`, this.hide, !1, r=>r.type === gt && !D(r.target, this.$el) || r.type === "keydown" && r.keyCode === C.ESC), x([document, ...Vt(this.$el)], "scroll", i, {
passive: !0
})];
L(this.tooltip, "hide", ()=>o.forEach(r=>r()), {
self: !0
})
}
),
this.toggleElement(this.tooltip, !0)
}
},
events: {
focus: "show",
blur: "hide",
[`${At} ${qt}`](t) {
Tt(t) || this[t.type === At ? "show" : "hide"]()
},
[gt](t) {
Tt(t) && this.show()
}
}
};
function Ul(t) {
Je(t) || f(t, "tabindex", "0")
}
function th(t, e, [i,s]) {
const n = I(t)
, o = I(e)
, r = [["left", "right"], ["top", "bottom"]];
for (const l of r) {
if (n[l[0]] >= o[l[1]]) {
i = l[1];
break
}
if (n[l[1]] <= o[l[0]]) {
i = l[0];
break
}
}
const a = v(r[0], i) ? r[1] : r[0];
return n[a[0]] === o[a[0]] ? s = a[0] : n[a[1]] === o[a[1]] ? s = a[1] : s = "center",
[i, s]
}
var eh = {
mixins: [ss],
i18n: {
invalidMime: "Invalid File Type: %s",
invalidName: "Invalid File Name: %s",
invalidSize: "Invalid File Size: %s Kilobytes Max"
},
props: {
allow: String,
clsDragover: String,
concurrent: Number,
maxSize: Number,
method: String,
mime: String,
multiple: Boolean,
name: String,
params: Object,
type: String,
url: String
},
data: {
allow: !1,
clsDragover: "bdt-dragover",
concurrent: 1,
maxSize: 0,
method: "POST",
mime: !1,
multiple: !1,
name: "files[]",
params: {},
type: "",
url: "",
abort: P,
beforeAll: P,
beforeSend: P,
complete: P,
completeAll: P,
error: P,
fail: P,
load: P,
loadEnd: P,
loadStart: P,
progress: P
},
events: {
change(t) {
_(t.target, 'input[type="file"]') && (t.preventDefault(),
t.target.files && this.upload(t.target.files),
t.target.value = "")
},
drop(t) {
Ti(t);
const e = t.dataTransfer;
e != null && e.files && (z(this.$el, this.clsDragover),
this.upload(e.files))
},
dragenter(t) {
Ti(t)
},
dragover(t) {
Ti(t),
y(this.$el, this.clsDragover)
},
dragleave(t) {
Ti(t),
z(this.$el, this.clsDragover)
}
},
methods: {
async upload(t) {
if (t = _i(t),
!t.length)
return;
m(this.$el, "upload", [t]);
for (const s of t) {
if (this.maxSize && this.maxSize * 1e3 < s.size) {
this.fail(this.t("invalidSize", this.maxSize));
return
}
if (this.allow && !fo(this.allow, s.name)) {
this.fail(this.t("invalidName", this.allow));
return
}
if (this.mime && !fo(this.mime, s.type)) {
this.fail(this.t("invalidMime", this.mime));
return
}
}
this.multiple || (t = t.slice(0, 1)),
this.beforeAll(this, t);
const e = ih(t, this.concurrent)
, i = async s=>{
const n = new FormData;
s.forEach(o=>n.append(this.name, o));
for (const o in this.params)
n.append(o, this.params[o]);
try {
const o = await sh(this.url, {
data: n,
method: this.method,
responseType: this.type,
beforeSend: r=>{
const {xhr: a} = r;
x(a.upload, "progress", this.progress);
for (const l of ["loadStart", "load", "loadEnd", "abort"])
x(a, l.toLowerCase(), this[l]);
return this.beforeSend(r)
}
});
this.complete(o),
e.length ? await i(e.shift()) : this.completeAll(o)
} catch (o) {
this.error(o)
}
}
;
await i(e.shift())
}
}
};
function fo(t, e) {
return e.match(new RegExp(`^${t.replace(/\//g, "\\/").replace(/\*\*/g, "(\\/[^\\/]+)*").replace(/\*/g, "[^\\/]+").replace(/((?!\\))\?/g, "$1.")}$`,"i"))
}
function ih(t, e) {
const i = [];
for (let s = 0; s < t.length; s += e)
i.push(t.slice(s, s + e));
return i
}
function Ti(t) {
t.preventDefault(),
t.stopPropagation()
}
function sh(t, e) {
const i = {
data: null,
method: "GET",
headers: {},
xhr: new XMLHttpRequest,
beforeSend: P,
responseType: "",
...e
};
return Promise.resolve().then(()=>i.beforeSend(i)).then(()=>nh(t, i))
}
function nh(t, e) {
return new Promise((i,s)=>{
const {xhr: n} = e;
for (const o in e)
if (o in n)
try {
n[o] = e[o]
} catch {}
n.open(e.method.toUpperCase(), t);
for (const o in e.headers)
n.setRequestHeader(o, e.headers[o]);
x(n, "load", ()=>{
n.status === 0 || n.status >= 200 && n.status < 300 || n.status === 304 ? i(n) : s(xt(Error(n.statusText), {
xhr: n,
status: n.status
}))
}
),
x(n, "error", ()=>s(xt(Error("Network Error"), {
xhr: n
}))),
x(n, "timeout", ()=>s(xt(Error("Network Timeout"), {
xhr: n
}))),
n.send(e.data)
}
)
}
var oh = Object.freeze({
__proto__: null,
Countdown: nl,
Filter: ul,
Lightbox: Cl,
LightboxPanel: Gn,
Notification: El,
Parallax: Nl,
Slider: Ll,
SliderParallax: ao,
Slideshow: ql,
SlideshowParallax: ao,
Sortable: Vl,
Tooltip: Ql,
Upload: eh
});
return St(oh, (t,e)=>it.component(e, t)),
it
});